<script setup>
import { useUserStore } from '@/stores/user.js'
import { useRouter, useRoute } from 'vue-router'
import { ref } from 'vue'
const userStore = useUserStore()
const router = useRouter()
const route = useRoute()
const count = ref(0)
console.log(count.value)
</script>

<template>
  <div>
    我是app
    <div>
      <h1>当前路由: {{ route.path }}</h1>
      <h2>用户信息: {{ userStore.token }}</h2>
      <el-button @click="router.push('/')">
点击跳首页
</el-button>

      <el-button @click="userStore.setToken('123456')">
登录
</el-button>
      <button @click="userStore.removeToken()">
登出
</button>
      <div>hello</div>
    </div>
  </div>
</template>

<style scoped></style>
